package _mst;

/**
 * 面试题 08.03. 魔术索引
 */
public class T0803 {
    public int findMagicIndex(int[] nums) {
        for (int i = 0; i < nums.length; i++) {
            if (i == nums[i]) return i;
        }
        return -1;
    }
}
